#ifndef PRF_UART_H
#define PRF_UART_H


#define PRF_TXBUF_SIZE 48
#define PRF_RXBUF_SIZE 48

typedef struct
{
	uint8_t rssi;
	uint8_t ch;
	uint8_t sta;
	uint8_t txpwr;
	uint8_t txbuf[PRF_TXBUF_SIZE];
	uint8_t rxbuf[PRF_RXBUF_SIZE];
}prf_t;


#define RXSTA_IDLE	0
#define RXSTA_BUSY	1
#define RXSTA_FIN		2
#define UART_RXBUF_SIZE	32
#define UART_TXBUF_SIZE	32
typedef struct
{
	uint8_t rxbuf[UART_RXBUF_SIZE];
	uint8_t rxlen;
	uint8_t rxsta;
	uint8_t rxtm;
	uint8_t txbuf[UART_TXBUF_SIZE];
	uint8_t txlen;
}uart_t;


extern idata prf_t Prf;
extern idata uart_t Uart;


void UartProc(void);
void PrfProc(void);


#endif	//PRF_UART_H
